﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shop.Model;
using System.Data.Linq;
using System.Web;
using System.Configuration;

namespace Shop.Framework.Services {
    public class BaseService {

        private string ConnectionString;
        public BaseService() {
            ConnectionString = ConfigurationManager.ConnectionStrings["ShopDatabase"].ConnectionString;
        }

        public ShopDatabaseDataContext Context {
            get {
                ShopDatabaseDataContext context = new ShopDatabaseDataContext(ConnectionString);
                context.DeferredLoadingEnabled = false;
                return context;
            }
        }

    }
}
